<template>
  <div class="btn-operators">
    <el-button class="cancel" @click="cancel">取消</el-button>
    <el-button type="primary" class="save" :loading="saveLoading" @click="onSubmit">{{
      saveLoading ? '' : '保存'
    }}</el-button>
  </div>
</template>

<script lang="ts" setup>
import { defineEmits, defineProps } from 'vue'

defineProps({
  saveLoading: {
    type: Boolean,
    default: false,
  },
})

const emits = defineEmits(['cancel', 'confirm'])

const cancel = () => {
  emits('cancel')
}

const onSubmit = () => {
  emits('confirm')
}
</script>
